function A0_coef = DG_burger_generalize(u0, k, h, T, cfl,a, b, choice)
X = a : h : b;
N = length(X)-1;
[b_fun, db_fun] = pro_basis();
%生成矩阵
M = zeros(k+1,k+1);
% u_true = zeros(1,N);
for m = 1 : k+1
    for n = 1 : k+1
        PmPn = @(x) b_fun{n}(x).*b_fun{m}(x);
        M(m,n) = (h/2)*quadgk(PmPn, -1,1);
    end
end
%对初值做L_2投影
A0_coef = zeros(k+1, N);
for i = 1 : N
    x_mid = (X(i) + X(i+1))/2;
    b = zeros(k+1,1);
    for l = 1 : k+1
        Pl = @(x) b_fun{l}((2*(x - x_mid)/h));
        uPl = @(x) u0(x).*Pl(x);
        b(l) = quadgk(uPl,X(i),X(i+1));
    end
    A0_coef(:,i) = M\b;
end
dt = cfl*h;
t = 0;
while t < T
    if t + dt >T
        dt = T-t;
    end
    t = t + dt;
    if choice == 1
        A0_coef = RK3_burger(A0_coef,dt,M,b_fun,db_fun);
    else
        A0_coef = RK2_burger(A0_coef,dt,M,b_fun,db_fun);
    end
end
end